#!/usr/bin/node

const fs=require('fs'),
      uid=process.argv[2],
      gid=process.argv[3],
      src=process.argv[4],
      log=console.log;

//16-my-chown.js uid gid file




//修改所属用户组或用户


if(src==undefined||uid==undefined||gid==undefined){
  log('命令行参数不正确');
}
try{
  fs.chownSync(src,Number(uid),Number(gid));
}catch(e){
  log(e.message);
}
